import {
    createRouter,
    createWebHashHistory
} from 'vue-router'
const router = createRouter({
    history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式： createWebHistory
    routes: [{
            path: '/',
            redirect: '/login'
        },
        {
            path: "/login",
            name: 'login',
            component: () => import('@/views/login.vue'),
        },
        {
            path: "/home",
            name: 'home',
            component: () => import("@/views/home.vue"),
        },
        {
            path: "/shop",
            name: 'shop',
            component: () => import("@/views/shop.vue")
        },
        {
            path: "/community",
            name: 'community',
            component: () => import("@/views/community.vue"),
        },
        {
            path: "/my",
            name: 'my',
            component: () => import("@/views/my.vue")
        },
        {
            path:"/square",
            name:"square",
            component:()=>import("@/views/square.vue")
        },
        {
            path:"/register",
            name:"register",
            component:()=>import("@/views/register.vue")
        }
    ]
})
export default router